package com.ys.entity.news;

import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="NEWS_Article", catalog="Id")
public class NewsArticle extends BaseEntity<NewsArticle> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Title", nameJava="title", typeDataBase="varchar")
	private String title;
	@YsField(nameDataBase="Img", nameJava="img", typeDataBase="varchar")
	private String img;
	@YsField(nameDataBase="Summary", nameJava="summary", typeDataBase="varchar")
	private String summary;
	@YsField(nameDataBase="Detail", nameJava="detail", typeDataBase="text")
	private String detail;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public NewsArticle setId(Long id) {
		this.id = id;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public NewsArticle setTitle(String title) {
		this.title = title;
		return this;
	}
	public String getImg() {
		return img;
	}
	public NewsArticle setImg(String img) {
		this.img = img;
		return this;
	}
	public String getSummary() {
		return summary;
	}
	public NewsArticle setSummary(String summary) {
		this.summary = summary;
		return this;
	}
	public String getDetail() {
		return detail;
	}
	public NewsArticle setDetail(String detail) {
		this.detail = detail;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public NewsArticle setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public NewsArticle setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public NewsArticle setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static NewsArticle newsArticle(
		String title,
		String img,
		String summary,
		String detail,
		Integer status
			) {
		NewsArticle entity = new NewsArticle();
		entity.setTitle(title);
		entity.setImg(img);
		entity.setSummary(summary);
		entity.setDetail(detail);
		entity.setStatus(status);
		return entity;
	}
}